#include<iostream>
using namespace std;
#include<vector>
#include<queue>
#include<unordered_map>
int main() {
	int n, m;
	cin >> n >> m;
	vector<vector<int>> rd(n+1);
	vector<int> ans,rd1(n+1);
	for (int i = 0; i < m; ++i) {
		int a, b;
		cin >> a >> b;
		++rd1[b];
		rd[a].push_back(b);
	}
	queue<int> que;
	for (int i = 1; i <= n; ++i)
		if (rd1[i] == 0)
			que.push(i);
	while (!que.empty()) {
		ans.push_back(que.front());
		for (auto& e : rd[que.front()]) {
			--rd1[e];
			if (rd1[e] == 0)
				que.push(e);
		}
		que.pop();
	}
	if (ans.size() != n)
		cout << -1;
	else
		for (auto& e : ans)
			cout << e << ' ';
}